import {
	getOrderListApi,
	getOrderDetailApi,
	putOrderApi,
	saveOrderApi,
	delOrderApi,
	payRefundApi
} from '@/apis/order.js';

function getOrderList(info, successCallback, errCallback) {
	// 此时需要您的接口返回个人信息
	getOrderListApi(info).then(res => {
		successCallback && successCallback(res)
	}, err => {
		errCallback && errCallback(err)
	});
}

function getOrderDetail(info, successCallback, errCallback) {
	// 此时需要您的接口返回个人信息
	getOrderDetailApi(info).then(res => {
		successCallback && successCallback(res)
	}, err => {
		errCallback && errCallback(err)
	});
}

function putOrder(info, id, successCallback, errCallback) {
	// 此时需要您的接口返回个人信息
	putOrderApi(info, id).then(res => {
		successCallback && successCallback(res)
	}, err => {
		errCallback && errCallback(err)
	});
}


function saveOrder(info, successCallback, errCallback) {
	// 此时需要您的接口返回个人信息
	saveOrderApi(info).then(res => {
		successCallback && successCallback(res)
	}, err => {
		errCallback && errCallback(err)
	});
}

function delOrder(info, successCallback, errCallback) {
	// 此时需要您的接口返回个人信息
	delOrderApi(info).then(res => {
		successCallback && successCallback(res)
	}, err => {
		errCallback && errCallback(err)
	});
}

function payRefund(info, successCallback, errCallback) {
	// 此时需要您的接口返回个人信息
	payRefundApi(info).then(res => {
		successCallback && successCallback(res)
	}, err => {
		errCallback && errCallback(err)
	});
}




export {
	getOrderList,
	getOrderDetail,
	putOrder,
	delOrder,
	saveOrder,
	payRefund
}